package com.ymy.thinking.in.spring.bean.factory;

import org.springframework.beans.factory.DisposableBean;

/**
 * @author Ringo
 * @date 2021/8/27 22:57
 */
public class RewriteFinalizePersonFactory implements PersonFactory, DisposableBean {

    @Override
    protected void finalize() throws Throwable {
        System.out.println("当前对象 RewriteFinalizePersonFactory 正在被回收...");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("当前对象 RewriteFinalizePersonFactory 正在被销毁...");
    }
}
